<?php
    session_start();
    include "../../function/functionPHP.php";
    $mysqli=connect();
    
    $query="
        select  *
        from    officer
        where   user='".$_POST["user"]."' and
                pass='".md5($_POST["pass"])."'
        ";
    $result=$mysqli->query($query);
    if($result->num_rows>0){
        $_SESSION["ofAuthen"]=$result->fetch_array(MYSQLI_ASSOC);
        header("location:../../");
    }else{
        header("location:../../?page=authen/denied.php");
    }